home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / idl / nsIAutoCompleteController.idl < prev    next >
Text File  |  2006-05-08  |  5KB  |  156 lines

  1. /* ***** BEGIN LICENSE BLOCK *****
  2.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  3.  *
  4.  * The contents of this file are subject to the Mozilla Public License Version
  5.  * 1.1 (the "License"); you may not use this file except in compliance with
  6.  * the License. You may obtain a copy of the License at
  7.  * http://www.mozilla.org/MPL/
  8.  *
  9.  * Software distributed under the License is distributed on an "AS IS" basis,
  10.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  11.  * for the specific language governing rights and limitations under the
  12.  * License.
  13.  *
  14.  * The Original Code is mozilla.org code.
  15.  *
  16.  * The Initial Developer of the Original Code is
  17.  * Netscape Communications Corporation.
  18.  * Portions created by the Initial Developer are Copyright (C) 2001
  19.  * the Initial Developer. All Rights Reserved.
  20.  *
  21.  * Contributor(s):
  22.  *   Joe Hewitt <hewitt@netscape.com> (Original Author)
  23.  *   Dean Tessman <dean_tessman@hotmail.com>
  24.  *
  25.  * Alternatively, the contents of this file may be used under the terms of
  26.  * either the GNU General Public License Version 2 or later (the "GPL"), or
  27.  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  28.  * in which case the provisions of the GPL or the LGPL are applicable instead
  29.  * of those above. If you wish to allow use of your version of this file only
  30.  * under the terms of either the GPL or the LGPL, and not to allow others to
  31.  * use your version of this file under the terms of the MPL, indicate your
  32.  * decision by deleting the provisions above and replace them with the notice
  33.  * and other provisions required by the GPL or the LGPL. If you do not delete
  34.  * the provisions above, a recipient may use your version of this file under
  35.  * the terms of any one of the MPL, the GPL or the LGPL.
  36.  *
  37.  * ***** END LICENSE BLOCK ***** */
  38.  
  39. #include "nsISupports.idl"
  40.  
  41. interface nsIAutoCompleteInput;
  42.  
  43. [scriptable, uuid(CF2ACA0C-4FB1-42e4-8A54-23E832CB2A98)]
  44. interface nsIAutoCompleteController : nsISupports
  45. {
  46.   /*
  47.    * Possible values for the searchStatus attribute
  48.    */
  49.   const unsigned short STATUS_NONE = 1;
  50.   const unsigned short STATUS_SEARCHING = 2;
  51.   const unsigned short STATUS_COMPLETE_NO_MATCH = 3;
  52.   const unsigned short STATUS_COMPLETE_MATCH = 4;
  53.  
  54.   /*
  55.    * Possible key navigation values
  56.    */
  57.   const unsigned short KEY_UP = 1;
  58.   const unsigned short KEY_DOWN = 2;
  59.   const unsigned short KEY_LEFT = 3;
  60.   const unsigned short KEY_RIGHT = 4;
  61.   const unsigned short KEY_PAGE_UP = 5;
  62.   const unsigned short KEY_PAGE_DOWN = 6;
  63.   const unsigned short KEY_HOME = 7;
  64.   const unsigned short KEY_END = 8;
  65.   
  66.   /*
  67.    * The input widget that is currently being controlled.
  68.    */
  69.   attribute nsIAutoCompleteInput input;
  70.  
  71.   /*
  72.    * State which indicates the status of possible ongoing searches
  73.    */
  74.   readonly attribute unsigned short searchStatus;
  75.  
  76.   /*
  77.    * The number of matches
  78.    */
  79.   readonly attribute unsigned long matchCount;
  80.  
  81.   /*
  82.    * Start a search on a string, assuming the input property is already set.
  83.    */
  84.   void startSearch(in AString searchString);
  85.  
  86.   /*
  87.    * Notify the controller that the user has changed text in the textbox.  This includes all
  88.    * means of changing the text value, including typing a character, backspacing, deleting, or
  89.    * pasting in an entirely new value.
  90.    */
  91.   void handleText(in boolean aIgnoreSelection);
  92.  
  93.   /*
  94.    * Notify the controller that the user wishes to enter the current text
  95.    *
  96.    * @return True if the controller wishes to prevent event propagation and default event
  97.    */
  98.   boolean handleEnter();
  99.  
  100.   /*
  101.    * Notify the controller that the user wishes to revert autocomplete
  102.    *
  103.    * @return True if the controller wishes to prevent event propagation and default event
  104.    */
  105.   boolean handleEscape();
  106.  
  107.   /*
  108.    * Notify the controller that the user wishes to start composition
  109.    */
  110.   void handleStartComposition();
  111.  
  112.   /*
  113.    * Notify the controller that the user wishes to end composition
  114.    */
  115.   void handleEndComposition();
  116.  
  117.   /* 
  118.    * Handle tab. Just closes up.
  119.    */
  120.   void handleTab();
  121.  
  122.   /*
  123.    * Notify the controller of the following key navigation events:
  124.    *   up, down, left, right, page up, page down
  125.    *
  126.    * @return True if the controller wishes to prevent event propagation and default event
  127.    */
  128.   boolean handleKeyNavigation(in unsigned short key);
  129.  
  130.   /*
  131.    * Notify the controller that the user chose to delete the current
  132.    * auto-complete result.
  133.    */
  134.   boolean handleDelete();
  135.   
  136.   /*
  137.    * Get the value of the result at a given index in the last completed search
  138.    */
  139.   AString getValueAt(in long index);
  140.  
  141.   /*
  142.    * Get the comment of the result at a given index in the last completed search
  143.    */
  144.   AString getCommentAt(in long index);
  145.  
  146.   /*
  147.    * Get a the style hint for the result at a given index in the last completed search
  148.    */
  149.   AString getStyleAt(in long index);
  150.  
  151.   /*
  152.    * Set the current search string, but don't start searching
  153.    */
  154.   void setSearchString(in AString aSearchString);
  155. };
  156.